<extend name="Public:Base" />
<block name="title">
    <title>商户管理平台 - 美住接口服务</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" href="__PUBLIC__/src/meizhu/common.css"/>
</block>
<block name="document">
    <div id="doc" data-side-menu-id="sideMenuServer" data-side-menu-toggle-id="serverPromoSetting">
        <div id="doc-header">
            <include file="Public:Include_navbar" />
        </div>
        <div id="doc-center">
            <div class="container">
                <div id="condition-bar">
                    <div class="col-xs-3-15"></div>
                    <div class="col-xs-12-15">
                    </div>
                </div>
                <div class="col-xs-3-15">
                    <include file="Public:Include_sideMenu" />
                </div>
                <div class="col-xs-12-15">
                    <nav class="navbar navbar-default navbar-custom-fitin">
                        <div class="container-fluid">
                            <p class="navbar-text custom-navber-text">接口服务</p>
                            <div class="collapse navbar-collapse">
                                <ul class="nav navbar-nav navbar-right">
                                    <li>
                                        <a id="add-user-info"  data-target="#addModel" data-toggle="modal">新增</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </nav>
                    <div class="well well-custom-has-navbar">
                        <div class="well-custom-body">
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover" id="questionTalbe">
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>名称</th>
                                            <th>标识</th>
                                            <th>描述</th>
                                            <th class="">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <volist name="serverInfo" id="vo" key="key">
                                        <tr>
                                            <td>{$vo.id}</td>
                                            <td>{$vo.name}</td>
                                            <td>{$vo.sign}</td>
                                            <td>{$vo.description}</td>
                                            <td>
                                                <button class="btn btn-default  btn-sm edit" data-toggle="modal" data-json='{:json_encode($vo);}' data-target="#editModel">编辑</button>
                                            </td>
                                        </tr>
                                    </volist>
                                    <tr class="padtopx"><td colspan="4">{$page}</td></tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <div id="doc-footer">
            <include file="Public:Include_footer" />
        </div>
    </div>
    <!--end of doc-->

    <div class="modal fade" id="addModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">新增接口服务</h4>
                </div>
                <div class="modal-body">
                    <div class="form-container">
                        <div class="custom-form-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label for="requestQuestion" class="col-xs-2 control-label">简体名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" maxlength="15" id="requestZhName">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">描述：</label>
                                    <div class="col-xs-8">
                                        <textarea type="text" rows="8"  class="form-control" id="requestZhDescription">
                                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestQuestion" class="col-xs-2 control-label">繁体名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" maxlength="15" id="requestTwName">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">描述：</label>
                                    <div class="col-xs-8">
                                        <textarea type="text" rows="8"  class="form-control" id="requestTwDescription">
                                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestQuestion" class="col-xs-2 control-label">英文名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" maxlength="15" id="requestEnName">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">描述：</label>
                                    <div class="col-xs-8">
                                        <textarea type="text" rows="8"  class="form-control" id="requestEnDescription">
                                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestQuestion" class="col-xs-2 control-label">服务标识：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestServiceSign">
                                    </div>
                                </div>                                
                                <div class="form-group">
                                    <label for="requestVcode" class="col-xs-2 control-label">验证码：</label>
                                    <div class="col-xs-3-15" id="requestVcodeContainer">
                                        <input type="text" class="form-control" id="requestVcode" maxlength="4" placeholder="验证码">
                                    </div>
                                    <div class="col-xs-5 login-refresh-container">
                                        <img id="imgcode" onclick="javascript:refreshVcode();" src="{:U('Home/Public/vcode');}">
                                        <a id="refreshCode" href="javascript:refreshVcode();">换一张</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" id="requestCannel" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="requestAdd">保存</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="editModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">修改服务</h4>
                </div>
                <div class="modal-body">
                    <div class="form-container">
                        <div class="custom-form-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">中文名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditCnName" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">描述：</label>
                                    <div class="col-xs-6">
                                        <textarea type="text" class="form-control" id="requestEditCnDescription">
                                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">繁体名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditTwName" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">描述：</label>
                                    <div class="col-xs-6">
                                        <textarea type="text" class="form-control" id="requestEditTwDescription">
                                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group" style="height: 38px;">
                                    <label for="requestDesc" class="col-xs-2 control-label">英文名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditEnName" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-2 control-label">描述：</label>
                                    <div class="col-xs-6">
                                        <textarea type="text" class="form-control" id="requestEditEnDescription">
                                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestQuestion" class="col-xs-2 control-label">服务标识：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditServiceSign">
                                    </div>
                                </div>                                   
                                <div class="form-group">
                                    <label for="requestVcode" class="col-xs-2 control-label">验证码：</label>
                                    <div class="col-xs-3-15" id="requestVcodeContainer">
                                        <input type="text" class="form-control" id="requestEditVcode" maxlength="4" placeholder="验证码">
                                    </div>
                                    <div class="col-xs-5 login-refresh-container">
                                        <img id="editImgcode" onclick="javascript:refreshVcode('editImgcode');" src="{:U('Home/Public/vcode');}">
                                        <a id="refreshCode" href="javascript:refreshVcode('editImgcode');">换一张</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden"  id="requestId" value="" />
                    <button type="button" class="btn btn-default" id="requestCannel" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="requestEdit">保存修改</button>
                </div>
            </div>
        </div>
    </div>

</block>
<block name="extendFootJs">
    <script type="text/javascript" src="__PUBLIC__/uclbrt/js/jquery-plugin/tooltip.js"></script>
    <script type="text/javascript" src="__PUBLIC__/src/meizhu/common.js"></script>
    <script type="text/javascript" src="__PUBLIC__/src/meizhu/InterfaceServer/index.js"></script>
</block>
